Scheduling method of realizing the quality of service of router in integrated service

ABSTRACT

The present invention discloses a dispatching method available for high quality service of a router in an integrated service, the classified data package is inserted in three different service queues in the entering queue step, and calculated GRC determine the order of when the data package will be sent according to a provided virtual clock, upon which an outting queue step processing three queues in different ways and sending them to improve fairness and efficiency of the dispatching.

BACKGROUND OF THE INVENTION

1. Technical Field of the Invention

This invention relates to an integrated service method for providingend-to-end high quality service on a router, more particularly to adispatching method in the integrated service.

2. Background of the Invention

Integrated service of conventional router is accomplished by threefunction modules of the router: admission and control module,classifying module, dispatching module.

Admission and control module is responsible for setting up classifyingstate table and dispatching queue. When receiving a reservation request,the connecting and founding mechanism examines whether there is enoughresource according to the request appointed in the information throughadmitting control to determine if the call is admitted. If there isenough resource, the call is admitted, and a corresponding classifyingterm is inserted in the classifying table.

Classifying module is responsible for inserting data package ofdifferent streams in different dispatching queue, which is realized byexamining the head of the data package.

Dispatching module decides that each stream conforms with itsreservation request in the requirement of QoS. The dispatchingarithmetic will decide to transmit the next data package of which queue.

In the integrated service, there is best-trying service,load-controllable service and guaranteeing service. The guaranteeingservice must guarantee to meet certain requirements in end-to-end delayand link bandwidth. The load-controllable service is not of certainrequirements in delay but do be of certain requirements in linkbandwidth, and the package loss and delay at certain range isacceptable; best-trying service means the data package in the case ofjammed network can be abandoned.

The dispatching arithmetic is established upon fairness and efficiencyduring the queue-dispatching. Generally, a weight fairness queue (WFQ)is adopted. In WFQ, each port sets up a queue for the data package ofeach date stream, i.e., if N data streams pass the port, there are Nqueues at the port. The queues are serviced circularly. The mostoriginal WFQ is based on bit stream. Each stream fairly shares thebandwidth of the port according to certain predetermined weight. Ifr_(f) is the weight of stream f. And S_(f) (t₁, t₂) is data quantitywhen stream f is transmitted in all at [t₁, t₂]. Then for data stream fand m, lengths of queues both above zero, the equation is:${\frac{S_{f}\left( {t_{1},t_{2}} \right)}{r_{f}} - \frac{S_{m}\left( {t_{1},t_{2}} \right)}{r_{m}}} = 0$

In practical application, data is sent by data package but not by bit,thus

For data package dispatching, WFQ makes that${\frac{S_{f}\left( {t_{1},t_{2}} \right)}{r_{f}} - \frac{S_{m}\left( {t_{1},t_{2}} \right)}{r_{m}}}$near to be zero. If N data streams are transmitted in system, reservedweight is r₁, r₂, . . . , r_(N), S_(i)(t₀, t) represents servicequantity provided by stream i in (t₀,t], and within (t₀,t], there arealways some overstocked data packages in the stream i,${{\frac{S_{i}\left( {t_{0},t} \right)}{S_{j}\left( {t_{0},t} \right)} \geq {\frac{r_{i}}{r_{j}}\quad j}} = {1,2,\quad\ldots}}\quad,N$

This equation is always available. For all j of the above equation,${{{S_{i}\left( {t_{0},t} \right)}{\sum\limits_{j}^{\quad}r_{j}}} \geq {r_{i}{\sum\limits_{j}^{\quad}{S_{j}\left( {t_{0},t} \right)}}}} = {{r_{i}\left( {t - t_{0}} \right)}r}$

Wherein, r represents total bandwidth. Service bit rate$\frac{S_{i}\left( {t_{0},t} \right)}{t - t_{0}}$for stream i is no less than the reserved bit rate$\frac{r_{i}}{\sum\limits_{j}^{\quad}r_{j}}{r.}$

WFQ is the weight circular service of the analog bit stream. In onecircle, service quantity of each stream is proportional to the weight ofeach stream. Since sometimes data package can not be provided theservice by bit, WFQ dispatches data packages upon the increasingsequence of the departing time thereof logically to enable the analog ofbit stream circle. In order to calculate the departing sequence, WFQfurther sticks 2 time labels for each data package: a starting label andan ending label. Supposing that p_(f) ^(j) and l_(f) ^(j) isrespectively the jth data package and length of stream f, A(p_(f) ^(j))is arriving time of p_(f) ^(j), the starting label S(p_(f) ^(j)) ofp_(f) ^(j) and ending label F(p_(f) ^(j)) is defined as:S(p _(f) ^(j))=max {v(A(p _(f) ^(j))),F(p _(f) ^(j−1))}j≧1${F\left( p_{f}^{j} \right)} = {{{S\left( p_{f}^{j} \right)} + {\frac{l_{f}^{j}}{r_{f}}\quad j}} \geq 1}$

Wherein F(p_(f) ⁰)=0. v(t) means that which circle is processed atmoment t in the case of simple bit stream. WFQ dispatches data packageaccording to size of the ending label.

The process of realizing WFQ comprises: calculating the starting labeland the ending label of the data package, entering the correspondingqueue, recording the ending label of the last data package of each datastream in the classifying table. When there enters the jth data packageof a data stream, the ending label of the j−1th data package is gottenby classifying, and the starting label and the ending label of the jthdata package can be calculated accordingly. p_(f) ^(j) is added to theend of the queue corresponding to the stream f. Since F(p_(f)^(j−1))<(p_(f) ^(j)), the queue corresponding to each stream issequenced according to size of the ending label. When a dispatch isoutput, at each port, the data package with the minimum value of endinglabel is found from head element of all queues to send.

The dispatching method of WFQ is common in achieving quality of service(QoS) of router, also recommended by IETF, when achieving integratedservice, it is adopted by many manufacturers, but as WFQ is used inintegrated service, these three service queues including the best-tryingservice, the load-controllable service and the guaranteeing service areprocessed in a same way, what is used to determine the standard to senddata package is the value of ending label of the head element of allqueues. In fact, the broader the bandwidth is, the better thebest-trying service and the load-controllable service are; the requestedbandwidth is calculated upon the end-to-end delay to meet therequirement. If the ending label of some head elements of guaranteeingservice queues reaches the minimum at some moment, even if it does notreach the predefined delay, the element will be sent and occupy certainbandwidth of the port.

SUMMARY OF THE INVENTION

The object of the invention is, according to the drawback of the priorart, to provide a dispatching method available for high quality serviceof a router in integrated service by processing different service queuesin different ways to improve fairness and efficiency of the dispatching.

To get above objects, technical scheme of the present invention is: adispatching method available for high quality service of a router in anintegrated service, comprises the steps of: a step of entering queuestep, inserting a data package classified by a classifying module in abest-trying service queue or a load-controllable service queue or aguaranteeing service queue; and cutting queue step, selecting the datapackage from said three types of queues and sending them, and set avirtual clock variable to an initial value, said variable is accumulatedby a clock quantity occupied by the sent data package;

-   -   In the entering queue step, obtaining a GRC for each received        data package is upon the following equation:        ${GRC} = \left\{ \begin{matrix}        {A + \frac{L}{R}} & {A>={LAST\_ GRC}} \\        {{LAST\_ GRC} + \frac{L}{R}} & {A < {LAST\_ GRC}}        \end{matrix} \right.$

Wherein, GRC is a rate-guaranteeing clock, R is a reserved bandwidth atthe node, L is the length of the current data package, A is a virtualclock variable when the data package being received, LAST_GRC is the GRCof the data package at the end of the queue, which is equal to A whenthe data package is empty;

Said cutting queue step comprises steps of:

Determine whether current (virtual clock variable+length of longest datapackage/bandwidth of port) is smaller than the minimum GRC of theguaranteeing service queue, if so, select a data package with theminimum GRC from the best-trying service queue and the load-controllableservice queue and send it; if no, select a data package corresponding tothe minimum GRC of the guaranteeing service queue from guaranteeingservice queue and send it.

Since said dispatching method is adopted in the present invention,differentiating data packages of different service queues, especiallywhen current (virtual clock variable+length of longest datapackage/bandwidth of port) is smaller than the minimum GRC of theguaranteeing service queue, even if data package with the minimum GRC ofall queues is in the guaranteeing service queue, it is not sent, i.e.,on the premise of unaffecting QoS, more reserved bandwidth is set asidefor load-controllable service queue and best-trying service queue todecrease data package loss, in turn efficiency and fairness ofdispatching is improved, at the same time, virtual clock variable isadopted in the present invention, which enables GRC in dispatchinginstant lots of data packages to calculate, compare, in turn accuracy ofoperation is guaranteed.

BRIEF DESCRIPTION OF THE DRAWINGS

The invention will now be described in further detail with specificreference to the accompanying figures wherein:

FIG. 1 is the schematic diagram of realizing integrated service on aserver;

FIG. 2 is the flowchart of an embodiment of entering queue according tothe present invention;

FIG. 3 is the flowchart of an embodiment of outting queue according tothe present invention.

DETAIL DESCRIPTION OF THE EMBODIMENT

Referring to FIG. 1, data packages of different streams enter differentqueues respectively, all queues are classified to three types upon theservice standard requirement, wherein there is only one best-tryingservice queue, and there might be more than one load-controllableservice queue and guaranteeing service queue.

FIG. 2 shows a process of data packages entering the queue according toan embodiment of the present invention, the steps are:

-   -   1. Calculating GRC of data packages;    -   2. If port state of the router is state two, setting the port        state to the state three;        -   If the port state of the router is state one, setting the            port state to the state two;    -   3. Inserting the data packages in the queue.

In the step of the entering queue, the rate-guaranteeing clock (GRC) ofeach received data package shall be calculated. The data packages aresorted by GRC in each queue, since there are many data packages to beprocessed by router per second, a virtual clock variable is set tocalculate GRC, the variable is set initial value as power on, e.g.,reset. During the operation, only when there are data packages to sendin the outting queue step, the variable can be increased a value. Whenthree queues are all empty, the variable is reset to the initial value.When data packages arrive, their GRCs can be calculated according tocurrent virtual clock variable and GRC of data packages at the end ofarrived queues. In the present invention, port state of the router canbe set up to one of three states to be the basis of resetting flowchartcontrol sign and virtual clock variable. State one means the port is nottransmitting data; state two means port is transmitting data, but nodata package is queuing; state three means there are data packages queuewaiting to be output; a port state variable can be set to respectivelyrepresent said three states by three different values as 0, 1, 2. In theprocess for each entering queue, port states are examined, and the portstate variable is amended according to current state, the variable canalso be dispatched and amended. At state three, repeating the process ofselecting sending and outputting data packages and deleting the datapackages from the corresponding queue.

FIG. 3 shows a process of data packages outting queues according to anembodiment of the present invention, the steps are:

-   -   A. Examining the port state of the router, if it is state three,        processing to step B; if it is state two, setting the port state        of router to state one, resetting both the virtual clock        variable and LAST_GRC of best-trying service queue to their        initial values; if it is state one, resetting both the virtual        clock variable and LAST_GRC of best-trying service queue to        their initial values;    -   B. If the load-controllable service queue is not empty,        calculating the value of the minimum GRC of the head data        package in this type of queue in sequencing;    -   C. If the guaranteeing service queue is not empty, calculating        the minimum GRC of the head data package in this type of queue        in sequencing;    -   D. Examining whether the load-controllable service queue and        best-trying service queue are both empty, if no, going to step        F; if so, going to step E;    -   E. Examining whether the guaranteeing service queue is empty, if        so, the port state of router being set to state one, and the        value of virtual clock variable being reset to their initial        value; if no, selecting data package corresponding to the        minimum GRC of the guaranteeing service queue from the        guaranteeing service queue and send it, and deleting the data        package from the guaranteeing service queue;    -   F. Determining whether current (virtual clock variable+length of        longest data package/bandwidth of port) is smaller than the        minimum GRC of the guaranteeing service queue, if so, selecting        a data package with the minimum GRC from the best-trying service        queue and the load-controllable service queue and sending it,        and deleting the data package from corresponding queue; if no,        selecting a data package corresponding to the minimum GRC of        guaranteeing service queue from guaranteeing service queue and        sending it, and deleting the data package from the guaranteeing        service queue;    -   G. If there is data package to be sent, the virtual clock        variable being increased the value of (the data        package/bandwidth of port).    -   H. Examining whether the three queues are all empty, if so, the        port state of the router being set to state two.

Wherein, step A is used to examine the port state of a router, if thereare data packages queuing, going to following steps, otherwise,individual state parameters are set to their initial values, andwaiting; step B, C is respectively used to calculate the minimum GRC ofthe data packages of the load-controllable service queue and theguaranteeing service queue at the non-empty state, and data packages aresorted by GRC in each queue, the minimum GRC can be obtained from datapackages of the head. The quantity of the two types of queues are setaccording to real requirement. If the quantity is fewer, the minimum GRCcan be calculated by a bubbling sequencing method with simple arithmeticand time complexity; when the quantity of queues is more, heapsequencing method with small time complexity is preferred, the heap hasa structure of complete two-crossed tree, in which all non-leaf nodesare no more than its sub-root nodes, the minimum GRC can be calculatedby picking up the top element of the heap. Each time, after the topelement of heap is picked up, the value of GRC of the data packagesbehind the head are inserted and re-adjusted it to a heap; step D isused to examine whether the load-controllable service queue andbest-trying service queue are both empty; step E is used to dispatch andsend data package of the guaranteeing service queue in case that theload-controllable service queue and best-trying service queue are bothempty, and deleting the data package from the queue, moving up the nextdata package to the head; step F is used to determine how to select datapackage to send when the three queues are all empty, the determiningstandard is whether current (virtual clock variable+length of longestdata package/bandwidth of port) is smaller than the minimum GRC of theguaranteeing service queue, since in practical application, after eachdispatching, it is needed to calculate the minimum GRC of individualhead of load-controllable service queue and guaranteeing service queue,which enables the virtual clock variable to lapse, the bandwidth of portis defined as to be equal to the actual bandwidth multiplying by 0.9. InStep F, if current (virtual clock variable+length of longest datapackage/bandwidth of port) is smaller than the minimum GRC ofguaranteeing service queue, select a data package with the minimum GRCfrom the best-trying service queue and the load-controllable servicequeue to send, and delete the data package from corresponding queue,even if data package with the minimum GRC is in the guaranteeing servicequeue, it is not sent. The dispatching method for outting queue forprocessing three service queues in different ways is achieved throughsaid steps, only when the best-trying service queue andload-controllable service queue are both empty, their reserved bandwidthcan be occupied by the guaranteeing service, however, if current(virtual clock variable+length of longest data package/bandwidth ofport) is no less than the minimum GRC of guaranteeing service queue, thedata package of the guaranteeing service queue is dispatched preferably.Step G is used to add an adding value to the virtual clock variable incycle of process of each outting queue, the adding value is equal to thedata package/bandwidth of port; step H is used to examine port state ofthe router after the data package is sent.

It is known that the person of ordinary skill in the art can executethis invention by selecting different parameter or changing order of thesteps and other schemes amended upon the present invention, suchamendment shall be in the scope of the claims.

1. A dispatching method available for high quality service of a router in an integrated service, comprises the steps of: a step of entering queue step, inserting a data package classified by a classifying module in a best-trying service queue or a load-controllable service queue or a guaranteeing service queue; and outting queue step, selecting the data package from said three types of queues and sending them, the method characterized by: setting a virtual clock variable to an initial value, said variable being accumulated by a clock quantity occupied by the sent data package; in the entering queue step, obtaining a GRC for each received data package upon the following equation: ${GRC} = \left\{ \begin{matrix} {A + \frac{L}{R}} & {A>={LAST\_ GRC}} \\ {{LAST\_ GRC} + \frac{L}{R}} & {A < {LAST\_ GRC}} \end{matrix} \right.$ wherein, GRC is a rate-guaranteeing clock, R is a reserved bandwidth at the node, L is the length of the data package, A is a virtual clock variable when the data package being received, LAST_GRC is the GRC of the data package at the end of the queue, which is equal to A when the data package is empty; said outting queue step comprising steps: determining whether current (virtual clock variable+length of longest data package/bandwidth of port) is smaller than the minimum GRC of the guaranteeing service queue, if so, selecting a data package with the minimum GRC from the best-trying service queue and the load-controllable service queue and sending it; if no, selecting a data package corresponding to the minimum GRC of the guaranteeing service queue from guaranteeing service queue and sending it.
 2. The dispatching method of claim 1, characterized by setting a port state to one of three states for determining whether said virtual clock variable is reset to its initial value in the entering queue step or outting queue step, wherein the state one means that the port is not transmitting data; state two means the port is transmitting data, but no data package is queuing; state three means there are data packages queue waiting to be output.
 3. The dispatching method of claim 1, wherein said bandwidth of port being equal to the actual bandwidth multiplying by 0.9.
 4. The dispatching method of claim 1, wherein said clock quantity occupied by the sent data package being equaled to (the length of the data package/bandwidth of port).
 5. The dispatching method of claim 1, wherein at each port of the router, there being only one said best-trying service queue.
 6. The dispatching method of claim 1, wherein at each port of the router, there being more than one said loan-controllable service queue and said guaranteeing service queue.
 7. The dispatching method of claim 1, wherein the minimum GRC being calculated by a bubbling sequencing method upon individual GRC of the head data package of the queues.
 8. The dispatching method of claim 1, wherein the minimum GRC being calculated by a heap sequencing method upon individual GRC of the head data package of the queues, said heap having a structure of complete two-crossed tree, in which all non-leaf nodes are no more than sub-root nodes, the minimum GRC being top element of the neap.
 9. The dispatching method of claim 2, wherein the minimum GRC being calculated by a bubbling sequencing method upon individual GRC of the head data package of the queues.
 10. The dispatching method of claim 2, wherein the minimum GRC being calculated by a heap sequencing method upon individual GRC of the head data package of the queues, said heap having a structure of complete two-crossed tree, in which all non-leaf nodes are no more than sub-root nodes, the minimum GRC being top element of the heap.
 11. The dispatching method of claim 3, wherein the minimum GRC being calculated by a bubbling sequencing method upon individual GRC of the head data package of the queues.
 12. The dispatching method of claim 3, wherein the minimum GRC being calculated by a heap sequencing method upon individual GRC of the head data package of the queues, said heap having a structure of complete two-crossed tree, in which all non-leaf nodes are no more than sub-root nodes, the minimum GRC being top element of the heap.
 13. The dispatching method of claim 4, wherein the minimum GRC being calculated by a bubbling sequencing method upon individual GRC of the head data package of the queues.
 14. The dispatching method of claim 4, wherein the minimum GRC being calculated by a heap sequencing method upon individual GRC of the head data package of the queues, said heap having a structure of complete two-crossed tree, in which all non-leaf nodes are no more than sub-root nodes, the minimum GRC being top element of the heap.
 15. The dispatching method of claim 5, wherein the minimum GRC being calculated by a bubbling sequencing method upon individual GRC of the head data package of the queues.
 16. The dispatching method of claim 5, wherein the minimum GRC being calculated by a heap sequencing method upon individual GRC of the head data package of the queues, said heap having a structure of complete two-crossed tree, in which all non-leaf nodes are no more than sub-root nodes, the minimum GRC being top element of the heap.
 17. The dispatching method of claim 6, wherein the minimum GRC being calculated by a bubbling sequencing method upon individual GRC of the head data package of the queues.
 18. The dispatching method of claim 6, wherein the minimum GRC being calculated by a heap sequencing method upon individual GRC of the head data package of the queues, said heap having a structure of complete two-crossed tree, in which all non-leaf nodes are no more than sub-root nodes, the minimum GRC being top element of the heap. 